/**
 * @see https://umijs.org/zh-CN/plugins/plugin-access
 * */
export default function access(initialState: { currentUser: any }) {
  const { currentUser } = initialState || {};

  // console.log(currentUser);

  return {
    canAdmin: currentUser && currentUser.roleId === '1',
  };
}
